package com.basin.api.client;

import com.basin.api.vo.UriAuthConfigVO;
import com.basin.common.core.ServerName;
import com.basin.common.core.response.Resp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 * @date: 2025/3/24 20:01
 * @description:
 */
@FeignClient(value = ServerName.BASIN_AUTH, path = "/basin-auth/open-api")
public interface AuthClient {
    @GetMapping("/get-perms-by-login-id")
    Resp<List<String>> getPermsByLoginId(@RequestParam(name = "loginId") Object loginId);

    @GetMapping("/get-roles-by-login-id")
    Resp<List<String>> getRolesByLoginId(@RequestParam(name = "loginId") Object loginId);

    @GetMapping("/get-white-userIds")
    Resp<List<String>> getWhiteUserIds();

    @GetMapping("/get-white-ips")
    Resp<List<String>> getWhiteIps();

    @GetMapping("/get-white-uris")
    Resp<List<String>> getWhiteUris();

    @GetMapping("get-uri-auth-config")
    Resp<UriAuthConfigVO> getUriAuthConfig(@RequestParam(name = "uriName") String uriName);
}
